package test.action;

import test.OrderService;
import top.hserver.core.ioc.annotation.Controller;
import top.hserver.core.ioc.annotation.GET;
import top.hserver.core.ioc.annotation.Resource;
import top.test.service.HelloService;

import java.util.UUID;

@Controller
public class HelloAction {

    @Resource
    private HelloService helloService;

    @Resource("Order")
    private OrderService orderService;

    @GET("/sayHello")
    public String sayHello(){
        return helloService.sayHello();
    }

    @GET("/getOrder")
    public String getOrder(){
        return orderService.getOrder(UUID.randomUUID().toString());
    }

}
